<?php
class Cm extends AppModel {
	var $useDbConfig = "default";
	
	var $name = 'Cm';
	var $actsAs = array( 'Translate'=>array('name','keywords','description')); 
	
	// Use a different model
	var $translateModel = 'CmsI18n';
    // Use a different table for translateModel
    var $translateTable = 'cms_i18ns';
	
    var $displayField = 'name';    	
	var $validate = array(
		'controller' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'action' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'name' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

//	var $hasAndBelongsToMany = array(
////		'I18n' => array(
////			'className' => 'I18n',
////			'joinTable' => 'cms_i18ns',
////			'foreignKey' => 'cm_id',
////			'associationForeignKey' => 'i18n_id',
////			'unique' => true,
////			'conditions' => '',
////			'fields' => '',
////			'order' => '',
////			'limit' => '',
////			'offset' => '',
////			'finderQuery' => '',
////			'deleteQuery' => '',
////			'insertQuery' => ''
////		),
//		'CmsSection' => array(
//			'className' => 'CmsSection',
//			'joinTable' => 'cms_sections',
//			'foreignKey' => 'cms_id',
//			'associationForeignKey' => 'id',
//			'unique' => true,
//			'conditions' => '',
//			'fields' => '',
//			'order' => '',
//			'limit' => '',
//			'offset' => '',
//			'finderQuery' => '',
//			'deleteQuery' => '',
//			'insertQuery' => ''
//		)
//	);
	
	var $hasMany = array(
		'CmsSection' => array(
			'className' => 'CmsSection',
			'foreignKey' => 'cms_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
?>